package com.todod.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.todod.entity.ResultData;
import com.todod.service.PublicFileCollectService;

@RestController
@RequestMapping("/publicFileCollect")
public class PublicFileCollectController {

	@Autowired
	private PublicFileCollectService publicFileCollectService;

	/**
	 * 
	 * @param _userId
	 * @param reqRoleFile
	 * @return
	 */
	@PostMapping("/saveCollect")
	public ResultData saveCollect(@RequestAttribute Long _userId, Long fileId) {
		publicFileCollectService.saveData(_userId, fileId);
		return ResultData.success("ok");
	}

}
